package com.wesley.spring.entity;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * Company
 *
 * @author WangPanYong
 * @since 2020/10/30 14:15
 */
@Component
public class Company {

//    @Autowired
//    private Staff staff;

//    @Autowired
//    public Company(Staff staff) {
//        this.staff = staff;
//    }


	public void test() {
		System.out.println("num: "+ findStaff());
	}

	/**
	 * 多例Staff @Lookup 每次返回不同对象
	 */
	@Lookup("staff")
	Staff findStaff() {
		return null;
	}

}
